package com.fang.rocketmq.producer;

import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author fanglingxiao
 * @version 1.0
 * @description TODO
 * @date 2022/5/12 1:06 上午
 **/
@Component
public class TestProducer {

    @Autowired
    private RocketMQTemplate rocketmqtemplate;

    public void send(String topic, String msg) {
        rocketmqtemplate.convertAndSend(topic, msg);
    }
}
